﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using AutoF3.ProblemRetrievers;
using System.Configuration;

namespace AutoF3
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            var defaultCachedFilesDirectory =  Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +@"\AutoF3\CachedProblemHtmlFiles";
            ConfigurationManager.AppSettings["CachedFilesDirectory"] = defaultCachedFilesDirectory;

            var pr = new List<ProblemRetriever>();
            pr.Add(new AlgebraForumRetriever());
            pr.Add(new CombinatoricsForumRetriever());
            pr.Add(new GeometryForumRetriever());
            pr.Add(new InequalitiesForumRetriever());
            pr.Add(new IntermediateForumRetriever());
            pr.Add(new NumberTheoryForumRetriever());
            pr.Add(new PreOlympiadForumRetriever());

            var sb = new SheetBuilder();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(pr, sb));
        }
    }
}
